package cn.tedu.csmall.sso.utils;


import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.ArrayList;
import java.util.Collection;

@Getter
public class AdminUserDetails extends User {
    //用户id
    private Long id;
    public AdminUserDetails(Long id,
                            String username,
                            String password,
                            boolean enabled,
                            Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled,
                true, //账号未过期
                true, //凭证未过期
                true, //账号未锁定
                authorities);
        //手动赋值用户id
        this.id=id;
    }


}
